<?php
namespace app\index\controller;

use think\Controller;
use think\Session;

class Timing extends Base{
    //实名过期判断修改
     public function index(){
		 $res=db('real')->select();
		 $time=date('Y-m-d H:i:s');
		foreach($res as $key=>$value){
			if($res[$key]['rflg']==1){
				if($res[$key]['stoptime']<$time){
				 $rs=db('real')->where('rid',$res[$key]['rid'])->update(['rflg'=>3]);
				 if($rs){
					 echo '成功';
				 }else{
					 echo '失败';
				 }
			    }
			}
		}
	 }
	 
    
}
?>